\ProvidesPackage{beamerthemePFU}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\selectcolormodel{cmyk}
\mode<presentation>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% custom colors
\definecolor{PFUblue}{cmyk}{1,0.305,0,0.06}
\definecolor{PFUbluedark}{rgb}{0.0156,0.2578,0.5625} 
% http://www.colorsontheweb.com/colorwizard.asp#wizard, used start set: #0066cc
\definecolor{PFUcolorscheme1}{HTML}{FF6518}  % e.g. for block title
\definecolor{PFUcolorblockbg}{HTML}{0033cc}
\definecolor{PFUcolorblockfg}{HTML}{FCE94F}
\definecolor{PFUcolorscheme2}{HTML}{000000}  % e.g. title in headline
\definecolor{PFUcolorscheme3}{HTML}{C3DFFF}  % e.g. for poster background
% \definecolor{PFUcolorscheme3}{HTML}{FFFFFF}  % e.g. for poster background
\definecolor{PFUcolorscheme4}{HTML}{000000}
\definecolor{PFUcolorschemeHeadline}{HTML}{0033cc}  % for headline bg
%\definecolor{PFUcolorschemeFootline}{HTML}{000000}  % for headline bg
\definecolor{PFUcolorschemeFootline}{HTML}{100D09}  % for headline bg

% headline colors and fonts
\setbeamercolor{headline}{fg=white,bg=PFUcolorschemeHeadline}
\setbeamercolor{title in headline}{fg=white}
\setbeamercolor{author in headline}{fg=lightgray}
\setbeamercolor{institute in headline}{fg=lightgray}
\setbeamercolor{logo in headline}{fg=black,bg=lightgray}
\setbeamercolor{separation line}{bg=PFUcolorscheme1}

% footline colors and fonts
\setbeamercolor{footline}{fg=white,bg=PFUcolorschemeHeadline}
%\setbeamerfont{footline}{fg=white, size=\normalsize}

% body colors and fonts
\setbeamercolor*{normal text}{fg=black,bg=PFUcolorscheme3}

% block environment
\setbeamercolor*{block body}{bg=white,fg=black}
\setbeamercolor*{block title}{fg=PFUcolorblockfg,bg=PFUcolorblockbg}
\setbeamerfont{block title}{size=\large,series=\bf}

% example environment
\setbeamercolor*{example title}{fg=white,bg=PFUcolorscheme1}
%\setbeamerfont{example title}{size=\large,series=\bf,bg=PFUcolorscheme1,fg=white}


%\setbeamercolor*{example body}{fg=white,bg=PFUcolorscheme4}
%\setbeamercolor*{example title}{fg=white,bg=PFUcolorscheme1}


%  \setbeamercolor{framesubtitle}{fg=ta3orange, bg=ta2gray}
%  \setbeamercolor{author in head/foot}{fg=tabutter, bg=black}
%  \setbeamercolor{title in head/foot}{bg=tabutter, fg=black}


\setbeamercolor{alerted text}{fg=PFUcolorscheme1}
%\setbeamercolor{structure}{fg=PFUblue}

%  \setbeamertemplate{itemize/enumerate body begin}{
%  }
%  \setbeamertemplate{itemize/enumerate body end}{
%  }

\setbeamertemplate{itemize items}[triangle]
\setbeamertemplate{navigation symbols}{}  % no navigation on a poster

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{block begin}{
  \vskip.75ex
  \begin{beamercolorbox}[leftskip=1cm,colsep*=.75ex]{block title}%
    \usebeamerfont*{block title}\insertblocktitle
  \end{beamercolorbox}%
  {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
  \usebeamerfont{block body}%
  \begin{beamercolorbox}[colsep*=.75ex,sep=.75ex,vmode]{block body}%
    \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
  }
  \setbeamertemplate{block end}{
  \end{beamercolorbox}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareRobustCommand{\logoImage}[1]{\def\@logoImage{#1}}
\let\@logoImage\@empty

\setbeamertemplate{headline}{  
  \leavevmode

  \begin{beamercolorbox}[wd=\paperwidth]{headline}
    \begin{columns}[T]
      \begin{column}{.02\paperwidth}
      \end{column}
      \begin{column}{.07\paperwidth}
        % \begin{center}
        %   \ifx\@empty\@logoImage
        %   \else
        %   \includegraphics[width=.6\linewidth]{\@logoImage}
        %   \fi
        % \end{center}
        \vskip1ex
      \end{column}
      \begin{column}{.775\paperwidth}
        \vskip4ex
        \raggedleft
        \usebeamercolor{title in headline}{\color{fg}\textbf{\LARGE{\inserttitle}}\\[1ex]}
        \usebeamercolor{author in headline}{\color{fg}\large{\insertauthor}\\[1ex]}
        \usebeamercolor{institute in headline}{\color{fg}\large{\insertinstitute}\\[1ex]}     
      \end{column}
      \begin{column}{.15\paperwidth}
        \vskip1cm
        \begin{center}
          \ifx\@empty\@logoImage
          \else
          \includegraphics[width=.4\linewidth]{\@logoImage}
          \fi
        \end{center}
        \vskip1.5cm
      \end{column}
      \begin{column}{.03\paperwidth}
      \end{column}
    \end{columns}
  \end{beamercolorbox}
  
%%      \begin{beamercolorbox}[sep=0.1cm,wd=.1\paperwidth,center]{logo in headline}
%%        \vskip2ex
%%      \end{beamercolorbox}  
%%      \begin{beamercolorbox}[sep=1cm,wd=.7\paperwidth]{headline}
%%        \usebeamercolor{title in headline}{\raggedright\color{fg}\textbf{\LARGE{\inserttitle}}\\[1ex]}
%%        \usebeamercolor{author in headline}{\raggedright\color{fg}\large{\insertauthor}\\[1ex]}
%%        \usebeamercolor{institute in headline}{\raggedright\color{fg}\large{\insertinstitute}\\[1ex]}     
%%      \end{beamercolorbox}%
%%      \begin{beamercolorbox}[sep=0.1cm,wd=.18\paperwidth,center]{logo in headline}
%%        \includegraphics[height=5cm]{logos/rwth-hks44}
%%        \vskip2ex
%%      \end{beamercolorbox}  
%%    \end{beamercolorbox}
  
  \begin{beamercolorbox}[wd=\paperwidth]{lower separation line head}
    \rule{0pt}{2pt}
  \end{beamercolorbox}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareRobustCommand{\footContents}[1]{\def\@footContents{#1}}
\let\@footContents\@empty

\setbeamertemplate{footline}{
  \begin{beamercolorbox}[wd=\paperwidth]{upper separation line foot}
    \rule{0pt}{2pt}
  \end{beamercolorbox}

  \begin{beamercolorbox}[ht=4ex,leftskip=1cm,rightskip=1cm]{footline}%
    \ifx\@empty\@footContents
    \else
    \@footContents
    \fi
    \vskip1ex
  \end{beamercolorbox}

  \begin{beamercolorbox}[wd=\paperwidth]{lower separation line foot}
    \rule{0pt}{2pt}
  \end{beamercolorbox}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mode<all>



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "poster"
%%% TeX-PDF-mode: t
%%% End: 
